package com.jeesite.modules.dataScreen.domain.alarm;

import lombok.Getter;

import java.util.HashMap;
import java.util.Map;

@Getter
public enum AlarmFormCode {

    O_01("01", "投诉"),
    O_02("02", "咨询"),
    O_03("03", "求助"),

    ZX("10", "咨询"),
    TX("11", "投诉"),
    JY("12", "建议"),
    QZ("13", "求助"),
    BN("14", "报案"),
    REPORT("15", "报备"),
    YWBL("16", "业务办理"),
    BY("17", "表扬"),
    JB("18", "举报"),
    QT("19", "其他"),
    ;

    private static Map<String, String> map = new HashMap<>();
    private final String code;
    private final String name;

    static {
        for (AlarmFormCode value : AlarmFormCode.values()) {
            map.put(value.code, value.name);
        }
    }

    AlarmFormCode(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public static String toName(String code) {
        String s = map.get(code);
        return s;
    }
}
